<?php

/**
 * Page form.
 *
 * @package    sf_sandbox
 * @subpackage form
 * @author     Your name here
 * @version    SVN: $Id: sfDoctrineFormTemplate.php 23810 2009-11-12 11:07:44Z Kris.Wallsmith $
 */
class PageForm extends BasePageForm
{
	public function configure()
	{
		$this->widgetSchema['body'] = new sfWidgetFormTextareaFCK();
		if(!$this->isNew()) {
			$this->widgetSchema['alias'] = new sfWidgetFormInputHidden();
		} else {
			$this->validatorSchema['alias'] = new sfValidatorRegex(array('pattern'=>'/[^a-zA-Z0-9-_]/', "must_match"=>false),array("invalid"=>"Допустимы только латинские символы, цифры, тире и нижнее подчеркивание"));
		}
//		else
//			$this->widgetSchema['alias'] = new sfWidgetFormInput(array(),array('style'=>'width:300px'));

		$this->widgetSchema['keywords'] = new sfWidgetFormTextarea(array(),array('cols'=>100));
		$this->widgetSchema['description'] = new sfWidgetFormTextarea(array(),array('cols'=>100));

				
	}
}
